package com.study.spring.common;


import org.springframework.stereotype.Component;

//@Component
public class Person {

    public Person() {
    }

    public Person(String name, int age) {
        System.out.println("调用初始化方法");
        this.name = name;
        this.age = age;
    }

    String name;
    int age;

    public String getName() {
        return name;
    }

    public int getAge() {
        return age;
    }

    public void setName(String name) {
        this.name = name;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public void init(){
        System.out.println("创建对象生命周期开始");
    }

    public void destory(){
        System.out.println("对象销毁");
    }
}
